<template>
	<view>
		商品列表
		<div v-for="(item,index) in listData" :key="index">
			{{item.category}}
			{{item.ctime}}
			{{item.goodsDesc}}
			<image :src="item.imgUrl" mode=""></image>
		</div>
	</view>
</template>

<script>
	import listVue from './list.vue'
	export default {
		onLoad() {
			uni.request({
				url: 'http://api.wm.v6g.cn/users/checkLogin',
				method: 'post',
				data: {
					account: 'admin',
					password: '123456'
				},
				success(res) {

				}
			})
		},
		created() {
			let _this = this
			uni.request({
				url: 'http://api.wm.v6g.cn/goods/list',
				method: 'GET',
				data: {
					currentPage: 1,
					pageSize: 10
				},
				header: {
					'authorization': "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiY3RpbWUiOiIyMDIzLTA2LTI2VDA2OjU2OjIyLjAwMFoiLCJhY2NvdW50IjoiYWRtaW4iLCJwYXNzd29yZCI6IjEyMzQ1NiIsInVzZXJHcm91cCI6Iui2hee6p-euoeeQhuWRmCIsImltZ1VybCI6Imh0dHA6Ly9hcGkud20udjZnLmNuL2ltZ3MvMTY4ODM0NTU0NzY0Mi5wbmciLCJwaWQiOjEsImlhdCI6MTY5MDg2ODI2NiwiZXhwIjoxNjkxNDczMDY2fQ.76vgJpEddGZdNIGVtAtyvfjAP3a8EgJmlkGVOTbENBA"
				},
				success(res) {
					console.log('this>>>', res.data.data)
					_this.listData = res.data.data
				}
			})
		},
		data() {
			return {
				listData: [],
			};
		}

	}
</script>

<style lang="scss">

</style>